<?php

namespace app\common\model;

use think\Model;

class PopularScienceMagazine extends Model
{
    // 设置当前模型对应的完整数据表名称
    protected $table = 'supermedia_popular_science_magazine';

    // 设置主键
    protected $pk = 'id';

    // 自动时间戳
    protected $autoWriteTimestamp = false;

    // 定义字段列表
    protected $field = [
        'id', 'title', 'price', 'old_price', 'end_time', 'specs_tags',
        'magazine_introduction_content', 'exciting_preview_content',
        'subscribe_content', 'push_time_content', 'cover_image'
    ];

    // 设置日期字段
    protected $type = [
        'end_time' => 'date'
    ];
}